<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
	<div class="layui-form-item">
		<label class="layui-form-label">相册名称</label>
		<div class="layui-input-block">
			<input type="text" name="photo_name" value='{$vo.photo_name|default=""}' required="required" title="请输入相册名称" placeholder="请输入相册名称" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">封面图片</label>
		<div class='layui-input-block'>

			<!-- todo 默认图片设置 -->
			<img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.image_id|default='static/admin/theme/default/img/image.png'}" />
			<input type="hidden" name="image_id" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.image_id|default=''}" class="layui-input">
			<a class="btn btn-link" data-file="one" data-type="ico,png,jpg" data-field="image_id">上传图片</a>
			<p>建议上传商品图片的尺寸为xx px。</p>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">是否显示</label>
		<div class="layui-input-block">
			<input type="radio" name="status" {if condition="$vo.status eq 1"}checked{/if} value="1" title="正常" checked="">
			<div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>正常</span></div>
			<input type="radio" name="status" {if condition="$vo.status eq 2"}checked{/if} value="2" title="禁用">
			<div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>禁用</span></div>
		</div>
	</div>
	<div class="hr-line-dashed"></div>
	<div class="layui-form-item text-center">
		{if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id' />{/if}
		<input type="hidden" name="create_by" value="{$user.create_by}">
		<button class="layui-btn" type='submit'>保存数据</button>
		<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
	</div>

</form>

<script>
	window.form.render();
</script>